import request from '@/utils/request'

export function elementList(data) {
  return request({
    url: 'element/list',
    method: 'post',
    data
  })
}

export function elementItem(data) {
  return request({
    url: 'element/item',
    method: 'post',
    data
  })
}

export function elementAdd(data) {
  return request({
    url: 'element/add',
    method: 'post',
    data
  })
}

export function elementEdit(data) {
  return request({
    url: 'element/edit',
    method: 'post',
    data
  })
}

export function elementStatus(data) {
  return request({
    url: 'element/status',
    method: 'post',
    data
  })
}

export function elementDel(id) {
  return request({
    url: 'element/del',
    method: 'post',
    data: { id: id }
  })
}

export function elementReview(data) {
  return request({
    url: 'element/review',
    method: 'post',
    data
  })
}

export function elementImageList(id) {
  return request({
    url: 'element/image/list',
    method: 'post',
    data: { id: id }
  })
}

export function elementImageUpload(data) {
  return request({
    url: 'element/image/upload',
    method: 'post',
    data: data
  })
}

export function elementImageDel(data) {
  return request({
    url: 'element/image/del',
    method: 'post',
    data: data
  })
}
